home *** CD-ROM | disk | FTP | other *** search
- ;;; -*- Scheme -*-
-
- #|
- Description:
- This code tests variable caches and fluid let.
-
- Usage:
- (foo 4) -> 4
- (bar 4 5) -> 9
- (set! foo-var 5)
- (foo 4) -> 9
- (bar 4 6) -> 10
- |#
-
- (declare (usual-integrations))
-
- (define foo-var)
-
- (define (foo x)
- (if (unassigned? foo-var)
- x
- (+ x foo-var)))
-
- (define (bar x y)
- (fluid-let ((foo-var y))
- (foo x)))